#include<iostream>

#ifndef HEAPSORT_H
#define HEAPSORT_H


class heapclass
{

	int position;
	int *heapspace;

	public:
	heapclass()
	{
		position = 0;
		heapspace = NULL; 
	}
	

	int heapIntialize( int space );
	void heapPrint(char * filename);
	void heapClean();
	int heapIsEmpty();
	
	int heapInsert(int data);
	int heapRemoveMax();
	void heapSortInterface();

	~heapclass()
	{
		delete heapspace;
		position = 0;
	};
	
	private :
	
	void heapSort(int *heapspace, int left , int right );
	int fixHeapDown(int *headspace,int pos,int position);
	int fixHeapUp(int position);
	int SWAP( int* a, int* b);
	


	

};

#endif
